<%@ page language="java" import="java.util.*,edu.nanyang.domain.User" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<link rel="stylesheet" type="text/css" href="gpfw_layout.css"
			media="all" />
		<link rel="stylesheet" type="text/css" href="gpfw_color.css"
			media="all">
		<link rel="stylesheet" type="text/css"
			href="gpfw_font-size_medium.css" media="all" />
		<link rel="stylesheet" type="text/css" href="gpfw_print.css"
			media="print" />
		<script type="text/javascript" src="gpfw.js">
</script>
		<script type="text/javascript" src="js/jquery-1.4.4.js"
			charset="utf-8">
</script>
		<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"
			charset="utf-8">
</script>
	</head>

	<body>
		<table class="azmainFrame" cellspacing="0" cellpadding="0">
			<tr>
				<td class="azgyom">
					<table class="azpalette" cellpadding="0" cellspacing="0">
						<tr>
							<td class="azpalette">
								<table class="aztileLarge" cellspacing="0" cellpadding="0">
									<tr>
										<td>
											<ragSUBMIT1 " cellpadding="0" cellspacing="0"
												style="display:inline-table;">

											<span style="color: red;">${sessionScope.user==null?'尚未登录':'已登录'}</span>
											<%if(session.getAttribute("user")!=null){
												if("2".equals(((User)session.getAttribute("user")).getLogin())){
													out.print("<a href=\"user.jsp\">进入用户中心</a>");
												}else{
													out.print("<a href=\"admin.jsp\">进入用户中心</a>");
												}
											} %>
											<br />
											<span style="color: red;">${result}</span> 
											<s:form
												action="login"> <s:select list="#{'2':'普通用户登录','1':'管理员登陆'}"
												id="login" name="login1" key="身份"></s:select> 
												<s:textfield name="username" key="用户名"> </s:textfield> 
												<s:password name="password" key="密码"> </s:password> <tr> <td> 
												<s:submit value="登录"></s:submit> </td> 
												<td> 
												<a href="register.jsp">点此注册账户</a> </td> </tr> 
											</s:form> 
											
	</body>
</html> 